import random as r

def printIntor():
    print('qing shu ru A he B de neng li zhi ')

def getInputs():
    porA = eval(input ('please input A probability:'))
    porB = eval(input ('please input B probability:'))
    n = eval(input('please input the number of games:'))
    return porA,porB,n



def simNGames(porA,porB,n):
    winsA,winsB = 0
    for i in range():
        scoreA,scoreB = sim0neGame(porA,porB)
        if scoreA >scoreB :
            winsA += 1
        return winsA,winsB

def sim0neGame(porA,porB):
    scoreA,scoreB = 0, 0
    start = 'A'
    while  not (scoreA ==15 or scoreB == 15):
        if start =='A':
           if r.random()<porA:
               scoreA +=1
           else :
               start  = 'B'
        if start == 'B':
            if r.random()<porB:
                scoreB +=1
            else   :
                start = 'A'
    return scoreA,scoreB

def printSummary (winsA,winsB):
    print('sim{} games '.format())

a,b = sim0neGame(0.5,0.51)
print(a,b)


